package chapter4;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 学生专业及状况
 * Date:2021/4/2
 * ***************************************************************
 */
public class exc4_18 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.print("Enter two characters: ");
		String s=input.next();
		char major=s.charAt(0);
		String sMajor="";
		if(major=='M') {
			sMajor="Mathematics";
		}else if(major=='C') {
			sMajor="Computer Science";
		}else if(major=='I') {
			sMajor="Information tec.";
		}else {
			System.out.println("Invalid input");
			System.exit(1);
		}
		char grade=s.charAt(1);
		String sGrade="";
		if(grade=='1') {
			sGrade="Freshman";
		}else if(grade=='2') {
			sGrade="Sophomore ";
		}else if(grade=='3') {
			sGrade="Junior ";
		}else if(grade=='4') {
			sGrade="Senior";
		}else {
			System.out.println("Invalid input");
			System.exit(1);
		}
		
		System.out.print(sMajor+"  "+sGrade);
		
		
	}

}
